package com.easychat.controller;

import com.easychat.entity.dto.MessageSendDto;
import com.easychat.websocket.netty.MessageHandler;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author Dongdong
 * @注释
 */
@RestController
public class testController {
    @Resource
   private MessageHandler messageHandler ;
    @RequestMapping("/test")
    public String test(){
        MessageSendDto sendDto = new MessageSendDto();
        sendDto.setMessageContent("hahaha");
        messageHandler.sendMessage(sendDto);
        return "Hello World";
    }
}
